package com.smh.a04innerclassdemo4;

public class Outer {
//    class Inner{
//
//    }
    int b =10;
    public void show(){
        int a=10;

        //局部内部类不能直接用,定义在方法里面
        class Inner{
            String name;
            int age;

            public void method(){
                System.out.println("method");
                System.out.println(a);
                System.out.println(b);
            }
            public static void method2(){

                System.out.println("static method2");
                System.out.println(new Outer().b);
                System.out.println();
                //System.out.println(b);
            }
        }

        Inner inner = new Inner();
        inner.method();
        Inner.method2();

    }
}
